import { ArticlesResponse } from '@/types/data'
import request from '@/utils/request'

type Params = {
  channel_id: number // 频道ID
  timestamp: number // 当前时间的时间戳=》返回当前时间之前的新闻
}
/**
 * 获取新闻列表数据
 * @param params 
 * @returns 
 */
export function getArticleListApi(params: Params): Promise<ArticlesResponse> {
  return request.get('/articles', {
    params
  })
}